home *** CD-ROM | disk | FTP | other *** search
/ Disc to the Future 2 / Disc to the Future Part II Programmer's Reference (Wayzata Technology)(6013)(1992).bin / MAC / MPW_TOOL / TOOLS / TOOLS_WI / PERL / UNTESTED / H2PL / GETIOCTL.SIZ < prev    next >
Text File  |  1992-01-05  |  264b  |  14 lines

  1. #!/usr/bin/perl
  2.  
  3. open (IOCTLS,'/usr/include/sys/ioctl.h') || die "ioctl open failed";
  4.  
  5. while (<IOCTLS>) {
  6.     if (/^\s*#\s*define\s+\w+\s+_IO(R|W|WR)\('?\w+'?,\s*\w+,\s*([^)]+)/) {
  7.     $need{$2}++;
  8.     } 
  9. }
  10.  
  11. foreach $key ( sort keys %need ) {
  12.     print $key,"\n";
  13.